<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="/MES_Project/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
	function startOp(){
		if($("#startProductEA").val()==""){
			alert("생산량을 입력해주십시오");
			$("#startProductEA").focus();
			return false;
		}else if($("#startProductEA").val() > ${minCount}){
			alert("생산 가능수량을 초과하였습니다.\n	다시 입력해 주십시오.");
			$("#startProductEA").focus();
			return false;
		}
		$("#send").attr("action", "/${initParam.context_root}/startOp.do").submit();
	}
	
	function support(){
		var check = "${sessionScope.login_info.employee_yn }";
		if(check == "Y"){
			$("#send").attr("action", "/${initParam.context_root}/support.do").submit();
		}else{
			alert("관리자 권한입니다.");
			return false;
		}
	}
</script>
</head>
<body>
<form id="send" method="post">
<div id="container" style="width: 100%; height: 50%; background-color: white;">
<div id="stock" style="width: 65%; margin-left: 5%;margin-top: 10px; float: left;">
	<h2 style="color: red; text-align: center">총재고량</h2><hr>
	<div style="width: 30%; float: left;" >
		<center><h3>전면부 공정</h3></center><hr>
		플라스틱 커버 : ${countA }개<br><br>
		LCD : ${countB }개<br><hr>
	</div>
	<div style="width: 25%; float: left; margin-left: 5%" >
		<center><h3>기판 공정</h3></center><hr>
		칩셋 : ${countC }개<br><br>
		보드 : ${countD }개<br><hr>
	</div>
	<div style="width: 33%; float: left; margin-left: 5%" >
		<center><h3>뒷면부 공정</h3></center><hr>
		플라스틱 커버 : ${countE }개<br><br>
		배터리 : ${countF }개<br><hr>
	</div>
</div>
<div id="order" style="width: 20%; margin-left: 5%; margin-top: 10px; float: left;  text-align: center">
<h2 style="color: red;">주문현황</h2><hr>
	요청갯수 : 0개<br><br>
	생산가능수 : <font color="red">${minCount }개</font><br><br>
	<img src="img/buy.png" onclick="return support()"><br><br><hr>
	생산갯수<br>
	<input type="text" id="startProductEA" name="startProductEA">
</div>
</div>
<div style="width: 100%; height: 20%; float: left; margin-top: 5%">
<center><img src="img/start.png" id="startBtn"onclick="startOp()"></center>
</div>
</form>
</body>
</html>